package training;

import java.util.Scanner;

/**
 * @Author liangzai
 * @Description:
 */
public class J25_5_9_training {
//    public static void main(String[] args) {
//        System.out.printf("%.2lf",1.333333333333333333f);
//    }

    //激光炮
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        double[][] nums = new double[n+1][2];
        double max = Double.MIN_VALUE;
        //double MAX = Double.MIN_VALUE;
        for (int i = 1; i <= n; i++) {
            nums[i][0] = scanner.nextDouble();
            nums[i][1] = scanner.nextDouble();
            max = Math.max(max , nums[i][0]);
        }
        for (int i = 1; i <= n; i++) {
            if(nums[i][0] == max){
                if(max<=nums[i][1]){
                    System.out.printf("%.2f",nums[i][0]);
                }
            }
        }

    }

    //数据库
    public static void main(String[] args) {
        long mod = 1000000007l;
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        long D = 1;
        String string = "";
        for (int i = 0; i <= n; i++) {
            string = scanner.nextLine();
//            if(i==n-1){
//                System.out.println();
//            }
            //System.out.println(i+string+i);
            if(i==0) continue;
            if(string.charAt(0)=='D'){
                D = D*2l%mod;
            }
        }
        long sum = 1;
        while(n>0){
            sum *= n;
            sum %= mod;
            n--;
        }
        if(sum<D){
            sum *= mod;
        }
        long ret = sum/D;

        System.out.println(ret%mod);
    }
}






